package com.example.mybatisdemo2.controller;

import com.example.mybatisdemo2.model.UserInfo;
import com.example.mybatisdemo2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/user")
@RestController
public class UserInfoController {
    @Autowired
    public UserService userService;

    @RequestMapping("/queryUserInfos")
    public List<UserInfo> queryUserInfos(){
        return userService.queryUserInfos();
    }
}
